<td>
  <ul class="sf_admin_td_actions">
    <?php if ($sf_user->isAuthenticated()): ?>
      <!-- Owner -->
      <?php if ($sf_user->getTrader() == $trade->getTrader()): ?>
        <li class="sf_admin_action_see">
          <?php echo link_to(__('See your trade', array(), 'messages'), 'trade_show', $trade) ?>
        </li>
        <li class="sf_admin_action_home">
          <?php echo link_to(__('Homepage', array(), 'messages'), 'trader_home', $trade->getTrader()) ?>
        </li>
        <!-- Follower, Free, promotional -->
      <?php else: ?>
        <?php if ($sf_user->getTrader()->isFollowing($trade->getTraderId()) || $sf_user->getTrader()->isFreeAccess() || $trade->isPromotional()): ?>
          <li class="sf_admin_action_see">
            <?php echo link_to(__('See trade', array(), 'messages'), 'trade_show', $trade) ?>
          </li>
        <?php elseif ($sf_user->getTrader()->hasLeft($trade->getTraderId())): ?>
          <li class="sf_admin_action_followagain">
            <?php echo link_to(__('Follow again', array(), 'messages'), 'trader_follow', $trade->getTrader()) ?>
          </li>
        <?php else: ?>
          <li class="sf_admin_action_follow">
            <?php echo link_to(__('Follow', array(), 'messages'), 'trader_follow', $trade->getTrader()) ?>
          </li>
        <?php endif ?>
        <li class="sf_admin_action_moreinformation">
          <?php echo link_to(__('See %username%', array('%username%' => ucfirst($trade->getTrader()->getUsername())), 'messages'), 'trader_home', $trade->getTrader()) ?>
        </li>
      <?php endif ?>
        
    <!-- Not connected -->
    <?php else: ?>
      <li class="sf_admin_action_follow">
        <?php echo link_to(__('Follow', array(), 'messages'), 'trader_follow', $trade->getTrader()) ?>
      </li>
      <li class="sf_admin_action_moreinformation">
        <?php echo link_to(__('See %username%', array('%username%' => ucfirst($trade->getTrader()->getUsername())), 'messages'), 'trader_home', $trade->getTrader()) ?>
      </li>
    <?php endif ?>
  </ul>
</td>
